package org.toools.gwt.wmc.client.additive;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import java.util.Collection;
import org.toools.gwt.wmc.jpa.Additive;

public interface AdditiveService extends RemoteService {

    public static class Util {
		private static AdditiveServiceAsync instance;
		public static AdditiveServiceAsync getInstance(){
			if (instance == null) {
				instance = (AdditiveServiceAsync) GWT.create(AdditiveService.class);
				ServiceDefTarget target = (ServiceDefTarget) instance;
				target.setServiceEntryPoint(GWT.getHostPageBaseURL() + "WMC/AdditiveService");
			}
			return instance;
		}
	}

    Additive getAdditiveByID( Integer id );
    Collection<Additive> getAdditives();

    Additive create( Additive a );
    Boolean delete( Additive a );
    Boolean update( Additive a );
}